<m-api-data-table [dataSource]="data">
    <ng-container mDataTableColumn header="区域名称">
        <ng-template let-area_name="area_name">
            <td>{{ area_name}} </td>
        </ng-template>
    </ng-container>
    <ng-container mDataTableColumn header="终端别名">
        <ng-template let-name="name">
            <td>{{ name}} </td>
        </ng-template>
    </ng-container>
    <ng-container mDataTableColumn header="在线">
        <ng-template let-online="online">
            <td>
                <m-online-status-text [status]="online"></m-online-status-text>
            </td>
        </ng-template>
    </ng-container>
    <ng-container mDataTableColumn header="状态">
        <ng-template let-status="status">
            <td>
                <m-enable-status-text [status]="status"></m-enable-status-text>
            </td>
        </ng-template>
    </ng-container>
    <ng-container mDataTableColumn header="脚本执行状态">
        <ng-template let-reply="reply" let-status="status" >
            <td>
                <ng-container *ngIf="period_type===33282 || period_type===33281 else replyStatus">
                    <m-enable-status-text [status]="status"></m-enable-status-text>
                </ng-container>
                <ng-template #replyStatus>
                    {{ reply?.status | taskReplyStatus }} 
                </ng-template>
            </td>
        </ng-template>
    </ng-container>
    <ng-container mDataTableColumn header="脚本执行时间">
        <ng-template let-reply="reply">
            <td>
                <a *ngIf='reply?.status == "success"'>{{ reply?.updated_at | date}} </a>
            </td>
        </ng-template>
    </ng-container>
</m-api-data-table>